﻿using System;
using System.Collections.Generic;
using System.ServiceModel;
using PairingMatrixService.Contract;

namespace PairingMatrix.Web
{
    [ServiceContract]
    public interface IPairingMatrixService
    {
        [OperationContract]
        List<ProjectCard> GetProjectCards();

        [OperationContract]
        ProjectCard AddProjectCard(string title);

        [OperationContract]
        ProjectCard GetProjectCardFromMingle(int cardNumber, string username, string password);

        [OperationContract]
        List<ProjectCard> GetProjectCardsFromMingle(string mingleUrl, string username, string password);

        [OperationContract]
        void UpdateProjectCardDetails(int cardNumber, string title);

        [OperationContract]
        List<TeamMember> GetTeamMembers();

        [OperationContract]
        TeamMember AddTeamMember(string name, string photoUri);

        [OperationContract]
        void UpdateTeamMemberDetails(Guid id, string name, string photoUri);

        [OperationContract]
        void AddIceCreamToTeamMember(Guid id, DateTime date);

        [OperationContract]
        void ClearIceCreamsForTeamMember(Guid id);

        [OperationContract]
        void DeleteTeamMember(Guid id);

        [OperationContract]
        CardWallInstanceOnADate AddCardWallInstanceOn(DateTime date);

        [OperationContract]
        void AddProjectCardOnWallInstanceForDate(DateTime date, int cardNumber, double cardX, double cardY, string storyStatus, string wall, string cardName = "");

        [OperationContract]
        void RemoveCardSignUpFromWall(DateTime date, int cardNumber);

        [OperationContract]
        void AttachTeamMemberToProjectCard(DateTime date, int projectCardNumber, Guid teamMemberId, double teamMemberCardX, double teamMemberCardY);

        [OperationContract]
        int DetachTeamMemberFromAllProjectCards(DateTime date, Guid teamMemberId);

        [OperationContract]
        void AttachSecondaryProjectCardToProjectCard(DateTime date, int primaryProjectCardNumber, int secondaryProjectCardNumber, double projectCardX, double projectCardY);

        [OperationContract]
        int DetachProjectCardFromAllProjectCards(DateTime date, int projectCardNumber);

        [OperationContract]
        List<CardWallInstanceOnADate> GetCardWallInstancesBetween(DateTime startDate, DateTime endDate);

        [OperationContract]
        CardWallInstanceOnADate CopyWallInstance(DateTime from, DateTime to);

        [OperationContract]
        void SetStandupTime(DateTime date, TimeSpan standupTime);

        [OperationContract]
        void UpdateNoteForStorySignUp(int cardNumber, DateTime date, string note);

        [OperationContract]
        Settings GetSettings();

        [OperationContract]
        void SaveSettings(Settings settings);

        [OperationContract]
        void SaveData();

    }
}
